3.2.74 \(\int \frac {a+b \log (c x^n)}{x^2 (d+e \log (f x^m))} \, dx\) [174]

Optimal. Leaf size=133 \[ -\frac {b n}{e m x}-\frac {b e^{\frac {d}{e m}} n \left (f x^m\right )^{\frac {1}{m}} \text {Ei}\left (-\frac {d+e \log \left (f x^m\right )}{e m}\right ) \left (d+e \log \left (f x^m\right )\right )}{e^2 m^2 x}+\frac {e^{\frac {d}{e m}} \left (f x^m\right )^{\frac {1}{m}} \text {Ei}\left (-\frac {d+e \log \left (f x^m\right )}{e m}\right ) \left (a+b \log \left (c x^n\right )\right )}{e m x} \]

[Out]

-b*n/e/m/x-b*exp(d/e/m)*n*(f*x^m)^(1/m)*Ei((-d-e*ln(f*x^m))/e/m)*(d+e*ln(f*x^m))/e^2/m^2/x+exp(d/e/m)*(f*x^m)^
(1/m)*Ei((-d-e*ln(f*x^m))/e/m)*(a+b*ln(c*x^n))/e/m/x

________________________________________________________________________________________

Rubi [A]
time = 0.12, antiderivative size = 133, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {2347, 2209, 2413, 12, 15, 6617} \begin {gather*} \frac {e^{\frac {d}{e m}} \left (f x^m\right )^{\frac {1}{m}} \left (a+b \log \left (c x^n\right )\right ) \text {Ei}\left (-\frac {d+e \log \left (f x^m\right )}{e m}\right )}{e m x}-\frac {b n e^{\frac {d}{e m}} \left (f x^m\right )^{\frac {1}{m}} \left (d+e \log \left (f x^m\right )\right ) \text {Ei}\left (-\frac {d+e \log \left (f x^m\right )}{e m}\right )}{e^2 m^2 x}-\frac {b n}{e m x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])/(x^2*(d + e*Log[f*x^m])),x]

[Out]

-((b*n)/(e*m*x)) - (b*E^(d/(e*m))*n*(f*x^m)^m^(-1)*ExpIntegralEi[-((d + e*Log[f*x^m])/(e*m))]*(d + e*Log[f*x^m
]))/(e^2*m^2*x) + (E^(d/(e*m))*(f*x^m)^m^(-1)*ExpIntegralEi[-((d + e*Log[f*x^m])/(e*m))]*(a + b*Log[c*x^n]))/(
e*m*x)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 15

Int[(u_.)*((a_.)*(x_)^(n_))^(m_), x_Symbol] :> Dist[a^IntPart[m]*((a*x^n)^FracPart[m]/x^(n*FracPart[m])), Int[
u*x^(m*n), x], x] /; FreeQ[{a, m, n}, x] &&  !IntegerQ[m]

Rule 2209

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - c*(f/d)))/d)*ExpInteg
ralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

Rule 2347

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_)*((d_.)*(x_))^(m_.), x_Symbol] :> Dist[(d*x)^(m + 1)/(d*n*(c*x^n
)^((m + 1)/n)), Subst[Int[E^(((m + 1)/n)*x)*(a + b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, d, m, n, p}
, x]

Rule 2413

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_.)]*(e_.))*((g_.)*(x_))^(m_.), x_Sy
mbol] :> With[{u = IntHide[(g*x)^m*(a + b*Log[c*x^n])^p, x]}, Dist[d + e*Log[f*x^r], u, x] - Dist[e*r, Int[Sim
plifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, r}, x] &&  !(EqQ[p, 1] && EqQ[a, 0] &&
 NeQ[d, 0])

Rule 6617

Int[ExpIntegralEi[(a_.) + (b_.)*(x_)], x_Symbol] :> Simp[(a + b*x)*(ExpIntegralEi[a + b*x]/b), x] - Simp[E^(a
+ b*x)/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin {align*} \int \frac {a+b \log \left (c x^n\right )}{x^2 \left (d+e \log \left (f x^m\right )\right )} \, dx &=\frac {e^{\frac {d}{e m}} \left (f x^m\right )^{\frac {1}{m}} \text {Ei}\left (-\frac {d+e \log \left (f x^m\right )}{e m}\right ) \left (a+b \log \left (c x^n\right )\right )}{e m x}-(b n) \int \frac {e^{\frac {d}{e m}} \left (f x^m\right )^{\frac {1}{m}} \text {Ei}\left (-\frac {d+e \log \left (f x^m\right )}{e m}\right )}{e m x^2} \, dx\\ &=\frac {e^{\frac {d}{e m}} \left (f x^m\right )^{\frac {1}{m}} \text {Ei}\left (-\frac {d+e \log \left (f x^m\right )}{e m}\right ) \left (a+b \log \left (c x^n\right )\right )}{e m x}-\frac {\left (b e^{\frac {d}{e m}} n\right ) \int \frac {\left (f x^m\right )^{\frac {1}{m}} \text {Ei}\left (-\frac {d+e \log \left (f x^m\right )}{e m}\right )}{x^2} \, dx}{e m}\\ &=\frac {e^{\frac {d}{e m}} \left (f x^m\right )^{\frac {1}{m}} \text {Ei}\left (-\frac {d+e \log \left (f x^m\right )}{e m}\right ) \left (a+b \log \left (c x^n\right )\right )}{e m x}-\frac {\left (b e^{\frac {d}{e m}} n \left (f x^m\right )^{\frac {1}{m}}\right ) \int \frac {\text {Ei}\left (-\frac {d+e \log \left (f x^m\right )}{e m}\right )}{x} \, dx}{e m x}\\ &=\frac {e^{\frac {d}{e m}} \left (f x^m\right )^{\frac {1}{m}} \text {Ei}\left (-\frac {d+e \log \left (f x^m\right )}{e m}\right ) \left (a+b \log \left (c x^n\right )\right )}{e m x}-\frac {\left (b e^{\frac {d}{e m}} n \left (f x^m\right )^{\frac {1}{m}}\right ) \text {Subst}\left (\int \text {Ei}\left (-\frac {d+e x}{e m}\right ) \, dx,x,\log \left (f x^m\right )\right )}{e m^2 x}\\ &=\frac {e^{\frac {d}{e m}} \left (f x^m\right )^{\frac {1}{m}} \text {Ei}\left (-\frac {d+e \log \left (f x^m\right )}{e m}\right ) \left (a+b \log \left (c x^n\right )\right )}{e m x}+\frac {\left (b e^{\frac {d}{e m}} n \left (f x^m\right )^{\frac {1}{m}}\right ) \text {Subst}\left (\int \text {Ei}(x) \, dx,x,-\frac {d}{e m}-\frac {\log \left (f x^m\right )}{m}\right )}{e m x}\\ &=-\frac {b n}{e m x}-\frac {b e^{\frac {d}{e m}} n \left (f x^m\right )^{\frac {1}{m}} \text {Ei}\left (-\frac {d}{e m}-\frac {\log \left (f x^m\right )}{m}\right ) \left (\frac {d}{e m}+\frac {\log \left (f x^m\right )}{m}\right )}{e m x}+\frac {e^{\frac {d}{e m}} \left (f x^m\right )^{\frac {1}{m}} \text {Ei}\left (-\frac {d+e \log \left (f x^m\right )}{e m}\right ) \left (a+b \log \left (c x^n\right )\right )}{e m x}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.08, size = 87, normalized size = 0.65 \begin {gather*} \frac {-b e m n+e^{\frac {d}{e m}} \left (f x^m\right )^{\frac {1}{m}} \text {Ei}\left (-\frac {d+e \log \left (f x^m\right )}{e m}\right ) \left (a e m-b d n-b e n \log \left (f x^m\right )+b e m \log \left (c x^n\right )\right )}{e^2 m^2 x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])/(x^2*(d + e*Log[f*x^m])),x]

[Out]

(-(b*e*m*n) + E^(d/(e*m))*(f*x^m)^m^(-1)*ExpIntegralEi[-((d + e*Log[f*x^m])/(e*m))]*(a*e*m - b*d*n - b*e*n*Log
[f*x^m] + b*e*m*Log[c*x^n]))/(e^2*m^2*x)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.41, size = 2296, normalized size = 17.26

method result size
risch \(\text {Expression too large to display}\) \(2296\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))/x^2/(d+e*ln(f*x^m)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gn(I*f*x^m)^2*e-I*Pi*csgn(I*f*x^m)^3*e+2*d)/e/m)*Ei(1,ln(x)-1/2*I*(e*Pi*csgn(I*f)*csgn(I*x^m)*c
sgn(I*f*x^m)-e*Pi*csgn(I*f)*csgn(I*f*x^m)^2-e*Pi*csgn(I*x^m)*csgn(I*f*x^m)^2+e*Pi*csgn(I*f*x^m)^3+2*I*e*ln(f)+
2*I*e*(ln(x^m)-m*ln(x))+2*I*d)/e/m)*ln(x^m)+b*n/e^2/m^2/x*f^(1/m)*(x^m)^(1/m)*exp(1/2*(-I*Pi*csgn(I*f)*csgn(I*
x^m)*csgn(I*f*x^m)*e+I*Pi*csgn(I*f)*csgn(I*f*x^m)^2*e+I*Pi*csgn(I*x^m)*csgn(I*f*x^m)^2*e-I*Pi*csgn(I*f*x^m)^3*
e+2*d)/e/m)*Ei(1,ln(x)-1/2*I*(e*Pi*csgn(I*f)*csgn(I*x^m)*csgn(I*f*x^m)-e*Pi*csgn(I*f)*csgn(I*f*x^m)^2-e*Pi*csg
n(I*x^m)*csgn(I*f*x^m)^2+e*Pi*csgn(I*f*x^m)^3+2*I*e*ln(f)+2*I*e*(ln(x^m)-m*ln(x))+2*I*d)/e/m)*d

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x^2/(d+e*log(f*x^m)),x, algorithm="maxima")

[Out]

integrate((b*log(c*x^n) + a)/((e*log(f*x^m) + d)*x^2), x)

________________________________________________________________________________________

Fricas [A]
time = 0.41, size = 83, normalized size = 0.62 \begin {gather*} -\frac {{\left (b m n e - {\left (b m x e \log \left (c\right ) - b n x e \log \left (f\right ) - b d n x + a m x e\right )} e^{\left (\frac {{\left (e \log \left (f\right ) + d\right )} e^{\left (-1\right )}}{m}\right )} \operatorname {log\_integral}\left (\frac {e^{\left (-\frac {{\left (e \log \left (f\right ) + d\right )} e^{\left (-1\right )}}{m}\right )}}{x}\right )\right )} e^{\left (-2\right )}}{m^{2} x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x^2/(d+e*log(f*x^m)),x, algorithm="fricas")

[Out]

-(b*m*n*e - (b*m*x*e*log(c) - b*n*x*e*log(f) - b*d*n*x + a*m*x*e)*e^((e*log(f) + d)*e^(-1)/m)*log_integral(e^(
-(e*log(f) + d)*e^(-1)/m)/x))*e^(-2)/(m^2*x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a + b \log {\left (c x^{n} \right )}}{x^{2} \left (d + e \log {\left (f x^{m} \right )}\right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))/x**2/(d+e*ln(f*x**m)),x)

[Out]

Integral((a + b*log(c*x**n))/(x**2*(d + e*log(f*x**m))), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x^2/(d+e*log(f*x^m)),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)/((e*log(f*x^m) + d)*x^2), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {a+b\,\ln \left (c\,x^n\right )}{x^2\,\left (d+e\,\ln \left (f\,x^m\right )\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*x^n))/(x^2*(d + e*log(f*x^m))),x)

[Out]

int((a + b*log(c*x^n))/(x^2*(d + e*log(f*x^m))), x)

________________________________________________________________________________________